﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Upreader.Usenet.Nntp
{
    public class NewsGroup
    {
        private readonly string _name;
        private readonly int _estimatedCount;
        private readonly int _firstArticleId;
        private readonly int _lastArticleId;

        public NewsGroup(string name, int estimatedCount, int firstArticleId, int lastArticleId)
        {
            _name = name;
            _estimatedCount = estimatedCount;
            _firstArticleId = firstArticleId;
            _lastArticleId = lastArticleId;
        }

        /// <summary>
        /// Gets the name of the group.
        /// </summary>
        public string Name
        {
            get { return _name; }
        }

        /// <summary>
        /// Gets the estimated article count.
        /// </summary>
        public int EstimatedCount
        {
            get { return _estimatedCount; }
        }

        /// <summary>
        /// Gets the first article id.
        /// </summary>
        public int FirstArticleId
        {
            get { return _firstArticleId; }
        }

        /// <summary>
        /// Gets the last article id.
        /// </summary>
        public int LastArticleId
        {
            get { return _lastArticleId; }
        }

        public override string ToString()
        {
            return _name + " " + _estimatedCount + " " + _firstArticleId + " " + _lastArticleId; 
        }
    }
}
